var currecturl = null;
var currect_top_state = false;
function loadAdminSideItemEntry() {
	$(".s_admin_sideitem").click(
			function(e) {
				if ($(this).hasClass("disabled"))
					return;
				if ($(this).hasClass("s_ajax_entry_enabled"))
					return;
				$(".s_admin_sideitem").removeClass("active").removeClass(
						"s_ajax_entry_enabled");
				if ($(this).attr("bind") != null) {
					$("." + $(this).attr("bind")).addClass("active").addClass(
							"s_ajax_entry_enabled");
				}
				$(this).addClass("active").addClass("s_ajax_entry_enabled");
				loadAdminPage($(this).attr("url"));
				if ($(this).attr("scroll") != "false") {
					window.scrollTo(0, 0);
				}
			});
}
function loadAdminPage(url) {
	currecturl = url;
	$(".s_admin_container").load(url);
}
function refresh() {
	$(".s_admin_container").load(currecturl);
}
function loadAdminTopItem() {
	$(".s_admin_top_item").click(function(e) {
		loadAdminPage($(this).attr("url"));
	});
}
function activeAdminTopItem(name) {
	$(".s_admin_top_item").removeClass("active");
	$("." + name).addClass("active");
}
function onChengeMode(isPhone) {
	if (isPhone) {
		loadPhoneMode();
	}else{
		loadTabletMode();
	}
}
function loadTabletMode() {
	$(".s_a_tablet_drop").append($(".s_admin_top_item"));
}
function loadPhoneMode() {
	$(".s_a_phone_drop").append($(".s_admin_top_item"));
}